package com.ghh.spring;


import junit.framework.TestCase;

import org.junit.Before;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * @author hgu
 *
 */
public class BeanTestCase extends TestCase {
	private ApplicationContext context;
	@Before
	protected void setUp() throws Exception {
		super.setUp();
		context = new FileSystemXmlApplicationContext(new String[]{"classpath:META-INF/test-beans.xml",
				"classpath:META-INF/test2-beans.xml"
		});
	}
	
	public void testSpringBeans() {
		TestBean bean = (TestBean) context.getBean("testBean");
		System.out.println(bean.getName());
	}
}
